package com.maben.security.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

// 配置mvc相关
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //配置外部可访问文件路径
        registry.addResourceHandler("/export_file/**").addResourceLocations("file:/temp/" );
        //静态资源映射
        registry.addResourceHandler("/json/**").addResourceLocations("classpath:/json/");
    }
}